-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multiple format image files for copyToTexture,image_file cases #4135
Conversation
…e cases This PR added multiple format image file to test CopyEI2T handles HTMLImageElements loaded from them. The format including coded files: *.png, *.jpg, *.bmp, *.ico, *.gif *.webp, and *.avif and svg file: *.svg
@@ -626,7 +626,7 @@ const kFourColorsInfo = { | |||
}, | |||
} as const; | |||
|
|||
export const kImageInfo = makeTable({ | |||
export const kEXIFImageInfo = makeTable({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that webp and avif also support EXIF. Not sure about any others. Possibly worth testing in a followup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, webp indeed support EXIF. AVIF support EXIF but browser(chrome) choose to ignore that part and using irot
instead. However, I still invesitigate how to modify irot
for avif file.
P.S. I ref to this article https://zpl.fi/exif-orientation-in-different-formats/ and did some experiment locally.
'four-colors.webp': kFourColorsInfo, | ||
'four-colors.gif': kFourColorsInfo, | ||
'four-colors.avif': kFourColorsInfo, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a note, I checked caniuse and it seems to say firefox and safari support webp and avif, so that's probably safe. Still would be worth checking that firefox and ideally safari will load all of these image files, if you haven't (just as standalone images; don't need to worry about whether their webgpu implementation supports them yet)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firefox stable(134.0) : All image files are supported.
Safari Stable (18.2) : All image files are supported.
Are there new changes to review? I don't think I can see them. However feel free to land this and add more tests in a follow-up PR, if you want. |
@kainino0x No more changes on code but just some infos updates about EXIF things and other brower ability to support image file formats. I think I have the rights to merge it. Will do it after bots finished. |
This PR added multiple format image file to test CopyEI2T handles HTMLImageElements loaded from them.
The format including coded files: *.png, *.jpg, *.bmp, *.ico, *.gif *.webp, and *.avif
and svg file: *.svg
Issue: #
Requirements for PR author:
.unimplemented()
./** documented */
and new helper files are found inhelper_index.txt
.Requirements for reviewer sign-off:
When landing this PR, be sure to make any necessary issue status updates.